/*
package com.noah.project.dao


import com.noah.project.model.User
import org.junit.Assert.assertNotNull
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner

*/
/**
 * Created by Wiki on 2018/5/25.
 *//*

@RunWith(SpringRunner::class)
@SpringBootTest
class UserRepositoryTest {

    @Autowired
    lateinit var repository: UserDao

    @Test
    @Throws(Exception::class)
    fun findById() {
        val user = repository.findById(999)
        assertNotNull(user)
        //assertEquals(1, user.id)
        println(user.toString())
    }

    @Test
    @Throws(Exception::class)
    fun findAll() {
        val users = repository.findAll()
        users?.forEach {
            println(it.toString())
        }
    }

    @Test
    @Throws(Exception::class)
    fun insert() {
        val user = User()
        user.name = "okok"
        var ret = repository.insert(user)
        println("insert ret = " + ret + ",user.id = " + user.uid)
    }

    @Test
    @Throws(Exception::class)
    fun deleteById() {
        var ret = repository.delete(1)
        println("delete ret = " + ret)
    }

    @Test
    @Throws(Exception::class)
    fun update() {
        val user = User(1014, "HAHAHAHA")
        var ret = repository.update(user)
        println("update ret = " + ret + user);
    }
}*/
